package com.jpro.module.bpm.api.task.dto;

import com.jpro.module.bpm.api.task.vo.BpmProcessInstanceCreateReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class BpmProcessInstanceRpcCreateReqDTO extends BpmProcessInstanceCreateReqVO {
    @NotNull(message = "创建用户ID")
    Long userId;
    /**
     * 业务的唯一标识
     * <p>
     * 例如说，请假申请的编号。通过它，可以查询到对应的实例
     */
    @NotEmpty(message = "业务的唯一标识")
    private String businessKey;

    @Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
    private Map<String, List<Long>> startUserSelectAssignees;

    /**
     * 流程定义的标识
     */
    @NotEmpty(message = "流程定义的标识不能为空")
    private String processDefinitionKey;

}
